package com.lingchen.boot.gof.proxy.jdk;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

/**
 * Created by lc on 2020/6/28
 */
public class QFang implements InvocationHandler {
    private Object instance;


    public QFang(Object instance) {
        this.instance = instance;
    }

    @Override
    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {

        args[0] = "Q房网替用户"+args[0]+"交钱";


        return method.invoke(instance,args);
    }
}
